package util;

import java.util.Calendar;
import java.util.Date;

public class Util {

	private Util() {

	}

	public static long getTodayAsNumber() {
		Calendar cal = Calendar.getInstance();
		if (cal.get(Calendar.HOUR_OF_DAY) >= 13) {
			cal.add(Calendar.DATE, 1);
		}
		
		return getDateNumberExpress(cal);
	}

	public static long getDateNumberExpress(Calendar date) {
		int year = date.get(Calendar.YEAR);
		int month = date.get(Calendar.MONTH);
		int day = date.get(Calendar.DAY_OF_MONTH);

		return day + month * 100 + year * 10000;

	}
}
